package com.woniuxy.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 客户审批记录实体类
 */
@Data
@TableName("customer_approval_record")
public class CustomerApprovalRecord {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    @TableField("customer_id")
    private Long customerId;
    
    @TableField("process_instance_id")
    private String processInstanceId;
    
    @TableField("task_id")
    private String taskId;
    
    @TableField("approver_id")
    private Long approverId;
    
    @TableField("approver_name")
    private String approverName;
    
    @TableField("approver_role")
    private String approverRole;
    
    @TableField("approval_step")
    private String approvalStep;
    
    @TableField("approval_result")
    private String approvalResult;
    
    @TableField("approval_comment")
    private String approvalComment;
    
    @TableField("approval_time")
    private LocalDateTime approvalTime;
    
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    /**
     * 审批结果枚举
     */
    public enum ApprovalResult {
        APPROVED("通过"),
        REJECTED("拒绝");
        
        private final String description;
        
        ApprovalResult(String description) {
            this.description = description;
        }
        
        public String getDescription() {
            return description;
        }
    }
}